﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.DAL;
using PBOffice.BLL;

public partial class PublicInformationModule_userDetails : System.Web.UI.Page
{
    UserManager um = new UserManager();
    protected void Page_Load(object sender, EventArgs e)
    {
        //页面首次加载
        if (!IsPostBack)
        {
            int userNo =int.Parse( Request.QueryString["UserNo"].ToString());     //获取通过URL传递过来的参数：用户编号
            v_UserDepPosition user = um.ShowUserInfoByUserNo(userNo);             //根据用户编号查询用户信息
            lblUserNo.Text = user.UserNo.ToString();         //用户编号
            lblUserName.Text = user.UserName;                //用户姓名
            if (user.UserGender == true)                     //用户性别
                lblUserGender.Text = "男";
            else
                lblUserGender.Text = "女";
            lblDepId.Text = user.DepId;                     //用户所在部门
            lblPositionId.Text = user.PosId;                //用户岗位
            lblUserLandLine.Text = user.UserLandline;       //座机
            lblUserMobile.Text = user.UserMobile;           //手机
            imgUser.ImageUrl = user.UserHeadimg;            //用户头像
        }
    }
    /// <summary>
    /// 返回按钮单击事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnReturn_Click(object sender, EventArgs e)
    {
        //转向到通讯录页面
        Response.Redirect("../PublicInformationModule/phoneBook.aspx");
    }
}